<template>
  <div>
    <el-form-item
      :label="value.type === 'IMPORT' ? '模版填写提示:' : '导出说明:'"
      prop="configJson.notes"
      :rules="[
        {
          required: true,
          message:
            value.type === 'IMPORT' ? '请输入模版填写提示:' : '请输入导出说明',
          trigger: 'blur',
        },
      ]"
    >
      <el-input
        type="textarea"
        v-model="value.configJson.notes"
        style="width: 100%"
        :autosize="{ minRows: 3 }"
        placeholder="请输入"
      />
    </el-form-item>
    <el-form-item
      v-if="value.type === 'IMPORT'"
      label="重复数据判断:"
      prop="configJson.duplicateCheckColumns"
      :rules="[
        { required: true, message: '请选择重复数据判断', trigger: 'blur' },
      ]"
    >
      <el-select
        multiple
        v-model="value.configJson.duplicateCheckColumns"
        placeholder="请选择"
        style="width: 300px"
      >
        <el-option
          v-for="item in value.configJson.columns"
          :key="item.id"
          :value="item.code"
          :label="item.name + '(' + item.code + ')'"
        ></el-option>
      </el-select>
    </el-form-item>
  </div>
</template>
<script>
export default {
  name: "GlobalConfig",
  props: {
    value: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {};
  },
  methods: {},
};
</script>